package cn.duli.xianer.dao;

import cn.duli.xianer.pojo.ReceiveAddress;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ReceiveAddressMapper {

    // 新增收货地址
    void save(ReceiveAddress receiveAddress);

    // 修改收货地址
    void update(ReceiveAddress receiveAddress);

    // 根据id删除此收货地址
    void deleteById(@Param("raId") Integer raId);

    // 根据id查询此收货地址详情
    ReceiveAddress findById(@Param("raId") Integer raId);

    // 查询收货地址列表
    List<ReceiveAddress> findAll();

    // 修改默认收货地址
    void updateDefault(ReceiveAddress receiveAddress);

    // 根据用户id查看该用户的收货地址列表
    List<ReceiveAddress> findByUserId(@Param("raUid") Integer raUid);

}